<template lang="pug">
md-button.btn.btn-primary.pull-right.btn-round(href='#/users/add') 删除用户
</template>

<script>
import axios from 'axios'

export default {
  name: 'user-delete-button',
  data() {
    return { }
  },
  methods: {
    deleteUser() {
      axios.delete(process.env.API_URL + '/users/' + this.userId)
      .then((response) => this.$router.push({path: '/users'}))
      .catch((error) => console.log(error))
    }
  }
}
</script>
